// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "../DeclareDelegate.h"
#include "InteractionParticipantComponent.generated.h"

UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class ANIMSAMPLE_API UInteractionParticipantComponent : public UActorComponent
{
	GENERATED_BODY()

public:	
	// Sets default values for this component's properties
	UInteractionParticipantComponent();

protected:
	// Called when the game starts
	virtual void BeginPlay() override;

public:	
	// Called every frame
	virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;

	UFUNCTION(BlueprintCallable)
	void ServerParticipantStart(AActor* Interactor, AActor* Participant);
	UFUNCTION(BlueprintCallable)
	void ServerParticipantStop(AActor* Interactor, AActor* Participant);

	UPROPERTY()
	FNotifyWithTwoActor NotifyParticipantStartScript;
	UPROPERTY()
	FNotifyWithTwoActor NotifyParticipantStopScript;
	
protected:
	UPROPERTY()
	FString StartScriptFunctionName{"ParticipantStart"};
	UPROPERTY()
	FString StopScriptFunctionName{"ParticipantStop"};
};
